$(function () {
  let couponid  = location.search.split('&')[0].split('=')[1];
  console.log(couponid);
  
  $.ajax({
    url: "http://localhost:3000/api/getcouponproduct",
    data: {couponid: couponid},
    success: function (res) {
      $('.main-inner').html(template('tmp', res))
    }
  });
})